package week4;

/**
 * Created by dell on 2017/3/18.
 */
public class Point {
    public final int x;
    public final int y;
    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
    @Override
    public boolean equals(Object that) {
        if(that instanceof Point) {
            Point p = (Point) that;
            return this.x == p.x && this.y == p.y;
        }
        return false;
    }
    @Override
    public int hashCode() {
        return 41 * (41 + x) + y;
    }
}